#include <inttypes.h>
#include "ObservableBounce.h"
#include "Observer/Observable.h"
#include "Bounce.h"

ObservableBounce::ObservableBounce(uint8_t pin, unsigned long interval_millis )
  : Bounce(pin, interval_millis), Observable() {
}

int ObservableBounce::update() {
  if (Bounce::update()) {
    Observable::notifyObservers();
    return true;
  } else {
    return false;
  }
}  
